<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>操行细则导入</title>
    <meta name="context-path" th:content="@{/}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap-responsive.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/colorpicker.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/datepicker.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/uniform.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/select2.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-style.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-media.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-full.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/font-awesome/css/font-awesome.css}"/>
    <link rel="stylesheet" th:href="@{/resources/valid/css/bootstrapValidator.css}"/>
    <link rel="stylesheet" th:href="@{/resources/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/resources/css/website.css}"/>
</head>
<body class="childbody">
<div class="container-fluid editform_fluid">
    <!--Chart-box-->
    <div class="row-fluid">
        <div class="widget-box">
            <div class="widget-title"><span class="icon"> <i class="icon-align-justify"></i> </span>
                <h5>操行细则导入</h5>
            </div>
            <div class="widget-content">
                    <form id="detailform" method="post" class="form-horizontal">
                    <input type="hidden" name="schoolId" th:field="*{schoolId}"  />
                    <div class="control-group">
                        <label class="control-label">文件 :</label>
                        <div class="controls  form-group">
                            <input type="file" id="myFile" name="myfiles"/>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button id="btnSubmit" type="button" class="btn btn-success">确定</button>
                        <button id="btnClose" type="button" class="btn btn-primary">关闭</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/resources/js/jquery.min.js}"></script>
<script th:src="@{/resources/js/jquery-migrate-1.2.1.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.ui.custom.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap.min.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap-colorpicker.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap-datepicker.js}"></script>
<script th:src="@{/resources/matrix/js/masked.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.uniform.js}"></script>
<script th:src="@{/resources/matrix/js/select2.min.js}"></script>
<script th:src="@{/resources/matrix/js/matrix.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.peity.min.js}"></script>
<script th:src="@{/resources/layui/layui.all.js}" charset="utf-8"></script>
<script th:src="@{/resources/valid/js/bootstrapValidator.js}"></script>
<script th:src="@{/resources/valid/js/language/zh_CN.js}"></script>
<script th:src="@{/resources/js/website.js}"></script>
<script th:src="@{/resources/js/system.js}"></script>
<script th:src="@{/resources/js/validation_fields.js}"></script>
<script th:src="@{/resources/js/ajaxfileupload.js}"></script>
<script th:inline="javascript">
    var contextRoot = $("meta[name='context-path']").attr("content");
</script>

<script th:inline="javascript">
    /*<![CDATA[*/
    layui.use(['form', 'layer', 'table'], function () {
        var schoolId = [[${schoolId}]];
        $("#btnSubmit").bind("click", function (event) {
            $.ajaxFileUpload({
                //处理文件上传操作的服务器端地址(可以传参数,已亲测可用)
                url: contextRoot + "schoolConductItem/fileUpload?schoolId="+schoolId,
                secureuri:false,                       //是否启用安全提交,默认为false
                fileElementId:'myFile',           //文件选择框的id属性
                dataType:'text',                       //服务器返回的格式,可以是json或xml等
                success:function(data){
                    //服务器响应成功时的处理函数
                    layer.msg(data, function () {
                    });
                    parent.importExcel.addCompleted();
                },
                error:function(data){ //服务器响应失败时的处理函数
                    layer.msg("导入失败！", function () {
                    });
                }
            });
        });
        $("#btnClose").bind("click", function (event) {
            parent.importExcel.closeDialog();
        });
    });
    /*]]>*/
</script>
</body>
</html>